package com.example.ying.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.ying.model.domain.Comment;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CommentMapper extends BaseMapper<Comment> {


    // 编写自定义方法

    // 根据电影ID查询评论

    @Select("SELECT * FROM comments WHERE movie_id = #{movieId}")
    List<Comment> selectByMovieId(Integer movieId);
}
